{extend name="layout:default" /}
{block name="title"}添加{/block}
{block name="content"}
<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">添加广告</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
            <a href="{:url('index')}" class="btn btn-info">返回</a>

        <form class="form-horizontal" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label class="col-sm-2 control-label">广告名称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="name" placeholder="广告名称">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="sort" placeholder="排序" value="50">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">图片链接</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="imgHref" placeholder="图片链接">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">链接打开方式</label>
                <div class="col-sm-10" >
                    <input type="radio" value="1" name="hrefType" checked>新窗口打开
                    <input type="radio" value="2" name="hrefType">本窗口打开
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告位置</label>
                <div class="col-sm-8">
                    <select name="pid" class="form-control">
                        {volist name="banner_positions" id="vo"}
                        <option value="{$vo.id}">{$vo.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告开始时间</label>
                <div class="col-sm-8">
                    <input type="datetime-local" class="form-control" name="starttime" placeholder="广告开始时间">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">广告结束时间</label>
                <div class="col-sm-8">
                    <input type="datetime-local" class="form-control" name="endtime" placeholder="广告结束时间">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-10">
                    <input type="radio"  value="1" name="status" checked >正常
                    <input type="radio"  value="2" name="status" >禁用
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">课程图片</label>
                <div class="col-sm-8">
                    <input type="file" name="image">
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-4">
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
            </div>
        </form>
    </div>
    <!-- /.box-body -->
</div>
{/block}